Conversation
| def main(): | ||
| parser = argparse.ArgumentParser(description=__doc__) | ||
| parser.add_argument( | ||
| "-f", "--isd_file", | ||
| type=Path, | ||
| help="Input ISD (Image Support Data) JSON file to extract kernel information from." | ||
| ) | ||
| parser.add_argument( | ||
| "-k", "--kernel_type", | ||
| default=None, |
There was a problem hiding this comment.
early on we walked about using click, no need to change now but any reason you went with an arparse script?
There was a problem hiding this comment.
Kept it consistent with how isd_generate is formatted. I can update to use click, should be straightforward.
| reference_frame_map = { | ||
| 1: "J2000", | ||
| 2: "B1950", | ||
| 3: "FK4", | ||
| 4: "DE-118", | ||
| 5: "DE-96", | ||
| 6: "DE-102", |
There was a problem hiding this comment.
cspice should be able to get these without furnishing anything, why are we maintaining our own?
| class KernelType(Enum): | ||
| """ | ||
| An enumeration representing supported SPICE kernel types and their | ||
| associated file extensions. | ||
|
|
||
| This class serves as the central authority for mapping kernel names | ||
| (e.g., 'SPK', 'CK') to their standard NAIF file extensions and provides | ||
| utility methods for distinguishing between binary and text-based kernels. | ||
| """ | ||
| SPK = ".bsp" | ||
| CK = ".bc" | ||
| FK = ".tf" | ||
| IK = ".ti" | ||
| LSK = ".tls" | ||
| MK = ".tm" | ||
| PCK = ".tpc" | ||
| SCLK = ".tsc" | ||
|
|
||
| @classmethod | ||
| def get_ext(cls, kernel_type: str) -> str: | ||
| """ | ||
| Retrieves the file extension for a given kernel type string. |
There was a problem hiding this comment.
some of this is partially already in SpiceQL. It would be better to augment that than reproduce here.
|
We should create tests for the applications, simple input output tests to make sure everything is working. Might be tricky with them being applications but we have to setup similar integration tests for isd_generate in the future. |
Addresses #602
Associated with this SpiceQL PR so make sure to build and install that locally before trying out
isd_to_kernel.**Looks like the tests are failing because they are relying on a SpiceQL version that has the changes mentioned above. Once a SpiceQL release is out, I will re-run the pipeline.
You can use ISDs in ALE's tests/pytest/data/isds/ to test CK and SPK creation.
Check out the help first:
Here are some examples:
*Note: It's possible that some CK/SPK generation may fail because their frame name is not included in the aliasMap in SpiceQL so that has to be updated first then you can test again.
You can check out the binary kernels with NAIFs toolkit
ckbriefandbriefand comment headers withcommnt.Run tests:
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: